package com.ovopark.organize.server.common.constant;

import com.google.common.collect.Lists;
import com.ovopark.organize.server.model.entity.MediaServerConfig;
import com.ovopark.organize.server.model.entity.SysParams;
import com.ovopark.organize.server.model.entity.WebModuleBackground;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Constant {
    public static final String DEFAULT_NATIONAL_CODE = "86";

    public static final Integer BUSINESS_USER = 0;
    // C端用户
    public static final Integer ACCOUNT_USER = 1;

    public static final List<Integer> SPECIAL_ROLE_NAME_NTERPRISE_LIST = Lists.newArrayList(1920321, 13953);
    // 门店异动记录类型
    // 新增门店
    public static final int DEP_NEW = 1;
    // 门店状态变更
    public static final int DEP_STATUS_CHANGE = 2;
    // 门店类型变更
    public static final int DEP_TYPE_CHANGE = 3;
    // 组织架构变更
    public static final int DEP_ORGANIZE_CHANGE = 4;
    // 加盟商变更
    public static final int DEP_FRANCHISEE_CHANGE = 5;
    // 门店信息变更
    public static final int DEP_INFO_CHANGE = 6;
    // 人员变更
    public static final int DEP_EMPLOYEE_CHANGE = 7;
    // 门店证件变更 新增
    public static final int DEP_CERTIFICATE_CHANGE_NEW = 8;
    // 门店证件变更
    public static final int DEP_CERTIFICATE_CHANGE = 9;

    public static final int DEVICE_IN_OR_OUT = 10;

    // 用户异动记录类型
    // 新增用户
    public static final int USER_NEW = 1;
    // 账号状态变更
    public static final int USER_STATUS_CHANGE = 2;
    // 上级领导变更
    public static final int USER_LEADER_CHANGE = 3;
    // 用户信息变更
    public static final int USER_INFO_CHANGE = 4;
    // 门店权限变更
    public static final int USER_DEP_PRIVILEGE_CHANGE = 5;
    // 角色变更
    public static final int USER_ROLE_CHANGE = 6;
    // 通讯录变更
    public static final int USER_ORGANIZE_CHANGE = 7;
    // 用户证件变更 新增
    public static final int USER_CERTIFICATE_CHANGE_NEW = 8;
    // 用户证件变更
    public static final int USER_CERTIFICATE_CHANGE = 9;
    // 用户岗位变更
    public static final int USER_DUTY_CHANGE = 10;
   // 加盟商类型转换
    public static final int FRANCHISEE_TYPE_CHANGE = 11;
    // 数据迁移
    public static final int USER_DATA_TRANSFER = 12;
    // 数据迁移
    public static final int USER_RESIGN = 13;

    public static List<String> TRANSFER_DATA_CATEGORY = Arrays.asList("待办单", "点检任务", "巡店报表", "手动抓拍任务", "开店流程", "审批");


    public static final String USER_PRIVILEGE_CACHE_PREFIX = "PRIVILEGES_";

    public static final String USER_WECHART_CorpID = "wxd6e5aaf1a293a437";

    public static final String USER_WECHART_ProviderSecret = "JN_noGUPWOnRAleMPhG74l2CCpqRssSG_E_Q1NxRSTEv_9uuOHX1JR1wue1le-RN";
    //public static final String USER_WECHART_ProviderSecret = "st7plJR5u8TuBxJeoRagdGvb45zbQru3IWDbwLRgH6c";

    public static final String USER_WECHART_templateid = "dk19bc6853c044a26f";
    public static final String USER_WECHART_Token = "nE1fObMC";
    public static final String USER_WECHART_sEncodingAESKey = "NYqmwbEUl2qkyI3O3U0xcHjwjZh8oBzPg6Y1SA2dfxz";


    public static final int RENT_RULE_CYCLE_MONTH = 1;
    public static final int RENT_RULE_CYCLE_QUARTER = 3;
    public static final int RENT_RULE_CYCLE_YEAR = 12;

    public static final int RENT_RECORD_STATUS_NOT_PAID = 0;
    public static final int RENT_RECORD_STATUS_HAS_PAID = 1;
    public static final int RENT_RECORD_STATUS_EXPIRED = 2;
    //订单总额异常
    public static final int AMOUNT_WARNING=1;
    //订单单品异常
    public static final int ORDER_WARNING=2;
    //消费次数异常
    public static final int COUNT_WARNING=3;
    //退单异常
    public static final int RETURN_WARNING=4;
    //折扣异常
    public static final int DISCOUNT_WARNING=5;
    //有单无人
    public static final int HAVE_ORDER_NO_PERSON=6;
    public static final String IPOS_SERVER_NAME = "/shopweb-ipos/";

    public static Map<String, String> map = new HashMap<>();
    // 首页背景图配置
    public static List<WebModuleBackground> WEB_BACKGROUND_URLS = new ArrayList<>();

    public static Map<String, String> systemProperty = new HashMap<>();

    private static ExecutorService executor = Executors.newFixedThreadPool(1000);

    public static final String CLIENT_WEB = "web";
    public static final String CLIENT_IOS = "iOS";
    public static final String CLIENT_ANDROID = "Android";
    public static final String CLIENT_HARMONY = "Harmony";
    //pc4客流设备
    public static final int PC4_DEVICE_TYPE = 0;
    //wifi探针设备
    public static final int WIFI_DEVICE_TYPE = 1;
    //人脸客流设备
    public static final int FACE_DEVICE_TYPE = 2;
    //人脸去重设备
    public static final int FACE_DEWEIGHT_DEVICE_TYPE = 3;

    //区域
    public static final int AREA_PORT = 1;
    //业态
    public static final int COMMERICAL_PORT = 2;
    //品牌
    public static final int BRAND_PORT = 3;
    //出入口
    public static final int PORT = 4;
    //试衣间
    public static final int FITTING_PORT = 5;
    //店外客流
    public static final int OUT_PASSENGER_PORT = 6;//圈外客流挂店外客流下
    //主出入口(is_primary_port =1 && tag_type = 0)
    public static final int PRIMARY_PORT = 7 ;

    public static final int OPERATION_ADD = 1;
    public static final int OPERATION_REMOVE = 2;
    public static final int OPERATION_MODIFY = 3;

    public static final int OFFLINE_ALERT = 1;
    public static final int ONLINE_ALERT = 2;
    public static final int MOVING_ALERT = 3;
    public static final int CHANNEL_ALERT = 4;
    public static final int VACANCY_ALERT = 5;
    public static final int VIDEO_ALERT=6;

    public static final int DM_ALARM_TYPE_IPC_OFFLINE = 0;  /* 前端掉线告警 */
    public static final int DM_ALARM_TYPE_NO_DISK	= 1;/* 没有磁盘 */
    public static final int DM_ALARM_TYPE_DISK_ERROR = 2;	    /* 磁盘错 */
    public static final int DM_ALARM_TYPE_IP_CONFLICT = 3;    /* IP冲突 */
    public static final int DM_ALARM_TYPE_RETICLE_BREAK = 4;    /* 网线断 */
    public static final int DM_ALARM_TYPE_NET_DROP = 5; /* 网速下降 */
    public static final int DM_ALARM_TYPE_RECROOM_FULL= 6;    /* 录像空间满 */
    public static final int DM_ALARM_TYPE_GRPROOM_FULL= 7;    /* 抓拍空间满 */
    public static final int DM_ALARM_TYPE_MEM_LACK= 8;    /* 内存不足 */
    public static final int DM_ALARM_TYPE_CPU_OVERLOAD= 9;   /* cpu过载 */
    public static final int DM_ALARM_TYPE_MAC_CONFLICT  = 10;  /* MAC地址冲突 */
    public static final int DM_ALARM_TYPE_REC_ERROR = 11;  /* 录像失败 */
    public static final int DM_ALARM_TYPE_REC_CLOSE = 12;  /* 录像关闭 */
    public static final int DM_ALARM_TYPE_REC_LOST = 13;   /* 视频源丢失 */

    /**
     * 入侵检测
     */
    public static final int INTRUSION_ALERT = 8;

    public static final int UPGRADE_SUCCESS_NOTIFY = 6;
    public static final int UPGRADE_FAILED_NOTIFY = 7;
    public static final int RANDOM_CHECK_COUNT = 5;
    // 置顶
    public static final int DIRECTION_TOP = 0;
    // 上移
    public static final int DIRECTION_UP = 1;
    // 下移
    public static final int DIRECTION_DOWN = 2;
    // 置底
    public static final int DIRECTION_BOTTOM = 3;

    public static final String COMMON_ON = "ON";//开
    public static final String COMMON_OFF = "OFF";//关
    private static SysParams sysParam = new SysParams();
    private static MediaServerConfig defaultMediaServerConfig;
    private static Map<Integer, MediaServerConfig> mediaServerConfigMap = new ConcurrentHashMap<>();
    //oss路径
    public static final String OSS_URL = "http://oss-cn-hangzhou.aliyuncs.com/ovopark/";


    // 默认语言：简体中文
    public static final String DEFAULT_LANG = "SIMPLIFIED_CHINESE";
    // 默认时区：东八区
    public static final String DEFAULT_TIME_ZONE = "GMT+8:00";

    public static final String OOS_PREFIX = "OOS_";
    public static final String OOS_CAPTURE_PREFIX = "OOSCAP_";
    public static final String FR3_CAPTURE_PREFIX = "FR3CAP_";
    public static final String DEV_MANAGER_CAP_PREFIX = "DEVMANAGERCAP_";
    public static final String ONLY_THUMB_ = "ONLYTHUMB_";

    public static final int CUSTOMER_TAG_CATEGORY = 0;//客流设备

    //public static final int FACE_TAG_CATEGORY = 4;//人脸客流设备

    /**
     * 导出excel 限制条数
     */
    public static final int EXPORT_MAX_NUMBER=4000;

    /**
     * 录像下载队列 key
     */
    public static final String DELAY_MESSAGE_KEY = "delay_message_key_";
    /**
     * 录像下载nvr key
     */
    public static final String DELAY_MESSAGE_DEVICE_KEY = "delay_message_device_key_";

    /**
     * 点检
     */
    public static final String  CHECK_TASK_REMIND_NOTIFY ="CHECK_TASK_REMIND_NOTIFY";
    public static final String  FINAL_CHECK_REPORT = "FINAL_CHECK_REPORT";

   // public static final String    TYPE_PATROL_REPORT ="TYPE_PATROL_REPORT";

    public static final String  FINAL_CHECK_REPORT_NOTIFY ="FINAL_CHECK_REPORT_NOTIFY";



    /**
     * 巡店报告
     */
    public static final String  CHECK_REPORT_SUBSCRIPTION ="CHECK_REPORT_SUBSCRIPTION";


    public static final String  CHECK_REPORT_SUBSCRIPTION_NOTIFY ="CHECK_REPORT_SUBSCRIPTION_NOTIFY";

    public static final String  CHECK_REPORT_REAL_TIME_NOTIFY ="CHECK_REPORT_REAL_TIME_NOTIFY";

    /**
     * AI  category：TYPE_AUDIT
     * objectType：AI_CHECK_AUDIT_NOTIFY
     */
    public static final String  AI_CATEGORY_TYPE_AUDIT ="TYPE_AUDIT";

    public static final String  AI_OBJECTTYPE_AI_CHECK_AUDIT_NOTIFY ="AI_CHECK_AUDIT_NOTIFY";

    //    public static HashMap<String, Object> TODO_MESSAGE_TYPES = new HashMap<>();
    public static List<String> TODO_MESSAGE_CATEGORIES = new ArrayList<>();
    public static List<String> WEB_MESSAGE_CATEGORIES = new ArrayList<>();
    public static List<String> WEB_MESSAGE_TYPES = new ArrayList<>();
    // 消息对应的权限
    public static Map<String, String> MESSAGE_PRIVILEGES = new HashMap<>();

    static {
        // 待办消息大类
        // 【AI巡店】
//        TODO_MESSAGE_CATEGORIES.add("TYPE_AUDIT");
        // 【待办单】
        TODO_MESSAGE_CATEGORIES.add("TYPE_PROBLEM");
        // 【点检中心】
        TODO_MESSAGE_CATEGORIES.add("TYPE_CHECK");
        TODO_MESSAGE_CATEGORIES.add("TYPE_CAPTURE");
        // 【相互巡店】
        TODO_MESSAGE_CATEGORIES.add("TYPE_MUTUAL_CHECK");
        // 协同巡店
        TODO_MESSAGE_CATEGORIES.add("COORDINATE_CHECK");
        // 【工作圈】
        TODO_MESSAGE_CATEGORIES.add("TYPE_HANDOVER");
        // 【计划巡店】
        TODO_MESSAGE_CATEGORIES.add("TYPE_STORE_PLAN_SYSTEM");
        // 【任务】
        TODO_MESSAGE_CATEGORIES.add("TYPE_TASK_CALENDAR");
        // 【审批】
        TODO_MESSAGE_CATEGORIES.add("TYPE_OA_APPROVAL");
        // 【掌上学院】
        TODO_MESSAGE_CATEGORIES.add("TYPE_TRAINING");
        // 【巡店审核】
        TODO_MESSAGE_CATEGORIES.add("TEMP_CHECK_REPORT");
        // 【开店流程】
        TODO_MESSAGE_CATEGORIES.add("TYPE_OPEN_SHOP");
        // 【考勤】
        TODO_MESSAGE_CATEGORIES.add("TYPE_ATTENDANCE_APPLY");
        // 营销
        TODO_MESSAGE_CATEGORIES.add("TYPE_XINFA");
        // 意见反馈
        TODO_MESSAGE_CATEGORIES.add("TYPE_OPINION");
        // IOT
        TODO_MESSAGE_CATEGORIES.add("TYPE_IOT");
        //追溯
        TODO_MESSAGE_CATEGORIES.add("TYPE_POS_DEVICE_ALARM");
        // 门店报备
        TODO_MESSAGE_CATEGORIES.add("TYPE_CHECK_INFORMATION_REPORT");
        // 设备告警
        TODO_MESSAGE_CATEGORIES.add("TYPE_DEVICE_ALARM");
        // 奖惩中心
        TODO_MESSAGE_CATEGORIES.add("REWARD_PENALTY");

        //代办加个新的大类  新品开发
        TODO_MESSAGE_CATEGORIES.add("TYPE_OPEN_OBJECT");

        // WEB端待办大类，
        WEB_MESSAGE_CATEGORIES.add("TYPE_PROBLEM");
        WEB_MESSAGE_CATEGORIES.add("TYPE_CHECK");
        WEB_MESSAGE_CATEGORIES.add("TYPE_TRAINING");
        WEB_MESSAGE_CATEGORIES.add("TEMP_CHECK_REPORT");
        WEB_MESSAGE_CATEGORIES.add("TYPE_TASK_CALENDAR");
        // 营销
        WEB_MESSAGE_CATEGORIES.add("TYPE_XINFA");
        //追溯
        WEB_MESSAGE_CATEGORIES.add("TYPE_POS_DEVICE_ALARM");
        //门店报备
        WEB_MESSAGE_CATEGORIES.add("TYPE_CHECK_INFORMATION_REPORT");
        //设备告警
        WEB_MESSAGE_CATEGORIES.add("TYPE_DEVICE_ALARM");
       //奖惩中心
        WEB_MESSAGE_CATEGORIES.add("REWARD_PENALTY");
        // 新品研发 谢虎
        WEB_MESSAGE_CATEGORIES.add("TYPE_OPEN_OBJECT");
        
        // WEB端待办小类
        WEB_MESSAGE_TYPES.add("TEMP_CHECK_REPORT_NOTIFY");
        WEB_MESSAGE_TYPES.add("Problem_Capture_Notify");
        WEB_MESSAGE_TYPES.add("Problem_FeedBack_Notify");
        WEB_MESSAGE_TYPES.add("Check_Task_Notify");
        WEB_MESSAGE_TYPES.add("TYPE_OFFLINETASK_SYSTEM");
        WEB_MESSAGE_TYPES.add("TYPE_TRAINING_SYSTEM");
        WEB_MESSAGE_TYPES.add("TYPE_COURSE_SYSTEM");
        WEB_MESSAGE_TYPES.add("TYPE_TRAINING_NEW_SYSTEM");
        WEB_MESSAGE_TYPES.add("TYPE_TASK_SYSTEM");
        WEB_MESSAGE_TYPES.add("TYPE_PAPER_SYSTEM");
        WEB_MESSAGE_TYPES.add("TYPE_TRAINING_SHIFT_TYPE");
        // 证书颁发/重新颁发推送
        WEB_MESSAGE_TYPES.add("TYPE_CERTIFICATE_AWARD_TYPE");
        // 证书回收推送
        WEB_MESSAGE_TYPES.add("TYPE_CERTIFICATE_RECOVERY_TYPE");
        // 岗位认证消息推送
        WEB_MESSAGE_TYPES.add("TYPE_CERTIFICATION_OBJ_TYPE");
        // 审批结果推送
        WEB_MESSAGE_TYPES.add("TYPE_APPROVAL_OBJ_TYPE");
        // 营销
        WEB_MESSAGE_TYPES.add("TYPE_TASK_REMIND");

         // 巡店新类型
        WEB_MESSAGE_TYPES.add("REFUSE_CHECK_REPORT_NOTIFY");

        //
         WEB_MESSAGE_TYPES.add("Pos_Device_Alarm_Notify");

        WEB_MESSAGE_TYPES.add("INFORMATION_ACCEPT_NOTIFY");

        WEB_MESSAGE_TYPES.add("DEVICE_OFFLINE_ALARM");
        //奖惩中心
       /* WEB_MESSAGE_TYPES.add("REWARD_PENALTY_CREATE");*/
        
        // 消息对应的权限
        MESSAGE_PRIVILEGES.put("TYPE_OA_APPROVAL", "APPROVAL");
        MESSAGE_PRIVILEGES.put("CHECK_REPORT_SUBSCRIPTION", "INSPECTION_REPORT");
//        MESSAGE_PRIVILEGES.put("TYPE_BIRD_DETECT", "SHOP_AGENT");
        MESSAGE_PRIVILEGES.put("TYPE_STORE_PLAN_SYSTEM", "STORE_PLAN");
        MESSAGE_PRIVILEGES.put("TYPE_FLOW", "OPERATION_ANALYSIS");
        MESSAGE_PRIVILEGES.put("TYPE_PROBLEM", "PROBLEM");
        MESSAGE_PRIVILEGES.put("certificateManagementMessage", "SHOP_MANAGE_ID_MANAGE");
        MESSAGE_PRIVILEGES.put("TYPE_TRAINING", "TRAINING");
        MESSAGE_PRIVILEGES.put("TYPE_ALERT", "ALARM");
        MESSAGE_PRIVILEGES.put("TYPE_OPEN_SHOP", "NEW_STORE_OPENING_PROCESS_APP");
        MESSAGE_PRIVILEGES.put("TYPE_HANDOVER", "HANDOVER_BOOK");
        MESSAGE_PRIVILEGES.put("TYPE_FEEDBACK", "CUSTOMER_FEEDBACK");
        MESSAGE_PRIVILEGES.put("FINAL_CHECK_REPORT", "SHOP_INSPECTION_RECORDS");
        MESSAGE_PRIVILEGES.put("IPOS_TYPE", "POS_WARNING");
        MESSAGE_PRIVILEGES.put("TYPE_SMART_WORKSHOP", "SMART_WORKSHOP");
        MESSAGE_PRIVILEGES.put("TYPE_PATROL_REPORT", "REPORT");
        MESSAGE_PRIVILEGES.put("TYPE_CHECK", "CHECK");
//        MESSAGE_PRIVILEGES.put("TYPE_FORM_CLOUD", "FORM_CLOUD");
        MESSAGE_PRIVILEGES.put("DISPLAY_CENTER_CATEGORY", "DISPLAY_CENTER");
        // 任务模块
        MESSAGE_PRIVILEGES.put("TYPE_TASK_CALENDAR", "TASK");


//        // 计划巡店
//        TODO_MESSAGE_TYPES.put("DISPLAY_PLAN", 1);
//        TODO_MESSAGE_TYPES.put("READ_PLAN", 1);
//        TODO_MESSAGE_TYPES.put("LIVE_CHECK_PLAN", 1);
//        TODO_MESSAGE_TYPES.put("REMOTE_CHECK_PLAN", 1);
//        TODO_MESSAGE_TYPES.put("DEP_CHECK_PLAN", 1);
//        TODO_MESSAGE_TYPES.put("EXECUTE_PLAN", 1);
//        TODO_MESSAGE_TYPES.put("INSPECTION_PLAN", 1);
//        TODO_MESSAGE_TYPES.put("DISPLAY_CENTER", 1);
//
//        // 巡店
//        // 巡店审核
//        TODO_MESSAGE_TYPES.put("TEMP_CHECK_REPORT_NOTIFY", 1);
//        // 巡店记录,消息
//        TODO_MESSAGE_TYPES.put("FINAL_CHECK_REPORT_NOTIFY", 1);
//        // 巡店报告
//        TODO_MESSAGE_TYPES.put("STATISTICS_DEPT_NOTIFY", 1);
//        TODO_MESSAGE_TYPES.put("STATISTICS_SUBSCRIPTION_NOTIFY", 1);
//        TODO_MESSAGE_TYPES.put("TASK_MERGER_REPORT_NOTIFY", 1);
//        // 相互巡店
//        TODO_MESSAGE_TYPES.put("MUTUAL_CHECK_PROPOSAL", 1);
//        TODO_MESSAGE_TYPES.put("MUTUAL_CHECK_GRANT", 1);
//        TODO_MESSAGE_TYPES.put("MUTUAL_CHECK_REJECT", 1);
//        // 待办单
//        TODO_MESSAGE_TYPES.put("Problem_Capture_Notify", 1);
//        TODO_MESSAGE_TYPES.put("Problem_FeedBack_Notify", 1);
//        // 点检中心
//        TODO_MESSAGE_TYPES.put("Check_Task_Notify", 1);
//        TODO_MESSAGE_TYPES.put("Capture_Task_Notify", 1);
//        // 任务
//        TODO_MESSAGE_TYPES.put("TYPE_TASK_SYSTEM", 1);
//        // 审批表单
//        TODO_MESSAGE_TYPES.put("OA_Approval_Notify", 1);
//        // 掌上学院
//        TODO_MESSAGE_TYPES.put("TYPE_TASK_SYSTEM", 1);
//        TODO_MESSAGE_TYPES.put("TYPE_PAPER_SYSTEM", 1);
//        TODO_MESSAGE_TYPES.put("TYPE_TRAINING_SYSTEM", 1);
//        TODO_MESSAGE_TYPES.put("TYPE_MATERIAL_SYSTEM", 1);
//        // 工作圈
//        TODO_MESSAGE_TYPES.put("Handover_Book_Notify", 1);
//        // AI巡店
//        TODO_MESSAGE_TYPES.put("AI_CHECK_AUDIT_NOTIFY", 1);
//        // 陈列对比
//
//        // 信发
//        TODO_MESSAGE_TYPES.put("AD_Push_Notify", 1);
//        // 智慧车间
//        TODO_MESSAGE_TYPES.put("SMART_WORK_SHOP", 1);
//        // 小鸟探店
//        TODO_MESSAGE_TYPES.put("REPORT_WAIT_CHECK", 1);
        // 资产平台 规则：MC+随机编号，特殊处理
//        TODO_MESSAGE_TYPES.put("REPORT_WAIT_CHECK", 1);

        try {
            ResourceBundle rb = ResourceBundle.getBundle("i18n/platform");
            Enumeration<String> keys = rb.getKeys();
            while (keys.hasMoreElements()) {
                String key = keys.nextElement();
                map.put(key, rb.getString(key));
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        try {
            ResourceBundle sytems = ResourceBundle.getBundle("i18n/system");
            Enumeration<String> sytemKeys = sytems.getKeys();
            while (sytemKeys.hasMoreElements()) {
                String key = sytemKeys.nextElement();
                systemProperty.put(key, sytems.getString(key));
            }
        }catch (Exception e){
            e.printStackTrace();
        }
//        try {
//            StringBuilder stringBuilder = new StringBuilder();
//            File file = new File("/extend/shopweb/version/template/mail_template.txt");
//            if (file.isFile() && file.exists()) {
//                InputStreamReader isr = new InputStreamReader(new FileInputStream(file), "utf-8");
//                BufferedReader br = new BufferedReader(isr);
//                String lineTxt = null;
//                while ((lineTxt = br.readLine()) != null) {
//                    stringBuilder.append(lineTxt);
//                }
//                br.close();
//                template = stringBuilder.toString();
//            } else {
//                System.out.println("文件不存在!");
//            }
//        } catch (Exception e) {
//            System.out.println("文件读取错误!");
//        }
    }

    public static SysParams getSysParam() {
        return sysParam;
    }

    public static void setSysParam(SysParams sysParam) {
        Constant.sysParam = sysParam;
    }

    public static List<WebModuleBackground> getWebBackgroundUrls() {
        return WEB_BACKGROUND_URLS;
    }

    public static void setWebBackgroundUrls(List<WebModuleBackground> webBackgroundUrls) {
        WEB_BACKGROUND_URLS = webBackgroundUrls;
    }

    public static MediaServerConfig getDefaultMediaServerConfig() {
        return defaultMediaServerConfig;
    }

    public static void setDefaultMediaServerConfig(MediaServerConfig defaultMediaServerConfig) {
        Constant.defaultMediaServerConfig = defaultMediaServerConfig;
    }

    public static Map<Integer, MediaServerConfig> getMediaServerConfigMap() {
        return mediaServerConfigMap;
    }

    public void setMediaServerConfigMap(Map<Integer, MediaServerConfig> mediaServerConfigMap) {
        Constant.mediaServerConfigMap = mediaServerConfigMap;
    }

    public static ExecutorService getThreadPool() {
        return executor;
    }

    //设置企业最大有效期（天）
    public static final Integer MAX_EXPIRE_INTERVAL=365;
    //设置企业默认有效期
    public static final Integer DEFAULT_EXPIRE_INTERVAL=3;

    public abstract class  OrganizePrefix {
        public static final String ORG_PREFIX = "O_";
        public static final String SHOP_PREFIX = "S_";
        public static final String SEPRATOR = "_";
    }
}
